
package combat.dudes.client.gui.images;

import java.awt.Graphics;

import javax.swing.JFrame;
import javax.swing.JPanel;


/**
 * @author Laurens Andriessen
 * @version 1.0
 */
public class Painter extends JFrame {

	private static final long serialVersionUID = 1L;

	public Painter() {
		repaint(); // Set up GUI and register mouse event handler
	}

	@Override
	public void paint(Graphics g) {
		// super.paint( g ); // clears drawing area

		// Image background = File.getImage(ClientGUI.guiShellBackground);

		/* Manual */
		// int W = 100, H = 100;

		/* Dynamic */
		// int W = this.getWidth(), H = this.getHeight();

		/* Fill entire desktop */
		// int W = Toolkit.getDefaultToolkit().getScreenSize().width;
		// int H = Toolkit.getDefaultToolkit().getScreenSize().height;

		/* 1:1 */
		// int W = background.getWidth(this);
		// int H = background.getHeight(this);

		// g.drawImage(background, 0, 0, W, H, this);

		// Graphics2D g2 = (Graphics2D) g;
		// g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

		// g2.setPaint(Color.gray);

		// GradientPaint redtowhite = new GradientPaint(0, 0, Color.red, W, H,
		// Color.blue);
		// g2.setPaint(redtowhite);
		// g2.fill(new RoundRectangle2D.Double(0, 0, 200, 200, 10, 10));

		// g.fillOval(10, 10, 10, 10);

		repaint();
	}

	public static void repaint(JPanel panel) {
		panel.invalidate();
		panel.validate();
		// panel.repaint();
	}

}
